3.25 \(\int \frac{d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx\)

Optimal. Leaf size=545 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (\frac{c^2 \left (2 a^2 m+3 a b k+b^2 h\right )-b^2 c (4 a m+b k)-c^3 (2 a h+b f)+b^4 m+2 c^4 d}{\sqrt{b^2-4 a c}}-c^2 (a k+b h)+b c (2 a m+b k)+b^3 (-m)+c^3 f\right )}{\sqrt{2} c^{7/2} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-\frac{c^2 \left (2 a^2 m+3 a b k+b^2 h\right )-b^2 c (4 a m+b k)-c^3 (2 a h+b f)+b^4 m+2 c^4 d}{\sqrt{b^2-4 a c}}-c^2 (a k+b h)+b c (2 a m+b k)+b^3 (-m)+c^3 f\right )}{\sqrt{2} c^{7/2} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) \left (-c^2 (2 a j+b g)+b c (3 a l+b j)+b^3 (-l)+2 c^3 e\right )}{2 c^3 \sqrt{b^2-4 a c}}+\frac{\log \left (a+b x^2+c x^4\right ) \left (-c (a l+b j)+b^2 l+c^2 g\right )}{4 c^3}+\frac{x \left (-c (a m+b k)+b^2 m+c^2 h\right )}{c^3}+\frac{x^2 (c j-b l)}{2 c^2}+\frac{x^3 (c k-b m)}{3 c^2}+\frac{l x^4}{4 c}+\frac{m x^5}{5 c} \]

[Out]

((c^2*h + b^2*m - c*(b*k + a*m))*x)/c^3 + ((c*j - b*l)*x^2)/(2*c^2) + ((c*k - b*m)*x^3)/(3*c^2) + (l*x^4)/(4*c
) + (m*x^5)/(5*c) + ((c^3*f - c^2*(b*h + a*k) - b^3*m + b*c*(b*k + 2*a*m) + (2*c^4*d - c^3*(b*f + 2*a*h) + b^4
*m - b^2*c*(b*k + 4*a*m) + c^2*(b^2*h + 3*a*b*k + 2*a^2*m))/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt
[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(7/2)*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + ((c^3*f - c^2*(b*h + a*k) - b^3*m +
b*c*(b*k + 2*a*m) - (2*c^4*d - c^3*(b*f + 2*a*h) + b^4*m - b^2*c*(b*k + 4*a*m) + c^2*(b^2*h + 3*a*b*k + 2*a^2*
m))/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(7/2)*Sqrt[b + Sqrt
[b^2 - 4*a*c]]) - ((2*c^3*e - c^2*(b*g + 2*a*j) - b^3*l + b*c*(b*j + 3*a*l))*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 -
4*a*c]])/(2*c^3*Sqrt[b^2 - 4*a*c]) + ((c^2*g + b^2*l - c*(b*j + a*l))*Log[a + b*x^2 + c*x^4])/(4*c^3)

________________________________________________________________________________________

Rubi [A]  time = 4.21328, antiderivative size = 545, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 10, integrand size = 55, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {1673, 1676, 1166, 205, 1663, 1657, 634, 618, 206, 628} \[ \frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (\frac{c^2 \left (2 a^2 m+3 a b k+b^2 h\right )-b^2 c (4 a m+b k)-c^3 (2 a h+b f)+b^4 m+2 c^4 d}{\sqrt{b^2-4 a c}}-c^2 (a k+b h)+b c (2 a m+b k)+b^3 (-m)+c^3 f\right )}{\sqrt{2} c^{7/2} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-\frac{c^2 \left (2 a^2 m+3 a b k+b^2 h\right )-b^2 c (4 a m+b k)-c^3 (2 a h+b f)+b^4 m+2 c^4 d}{\sqrt{b^2-4 a c}}-c^2 (a k+b h)+b c (2 a m+b k)+b^3 (-m)+c^3 f\right )}{\sqrt{2} c^{7/2} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) \left (-c^2 (2 a j+b g)+b c (3 a l+b j)+b^3 (-l)+2 c^3 e\right )}{2 c^3 \sqrt{b^2-4 a c}}+\frac{\log \left (a+b x^2+c x^4\right ) \left (-c (a l+b j)+b^2 l+c^2 g\right )}{4 c^3}+\frac{x \left (-c (a m+b k)+b^2 m+c^2 h\right )}{c^3}+\frac{x^2 (c j-b l)}{2 c^2}+\frac{x^3 (c k-b m)}{3 c^2}+\frac{l x^4}{4 c}+\frac{m x^5}{5 c} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x + f*x^2 + g*x^3 + h*x^4 + j*x^5 + k*x^6 + l*x^7 + m*x^8)/(a + b*x^2 + c*x^4),x]

[Out]

((c^2*h + b^2*m - c*(b*k + a*m))*x)/c^3 + ((c*j - b*l)*x^2)/(2*c^2) + ((c*k - b*m)*x^3)/(3*c^2) + (l*x^4)/(4*c
) + (m*x^5)/(5*c) + ((c^3*f - c^2*(b*h + a*k) - b^3*m + b*c*(b*k + 2*a*m) + (2*c^4*d - c^3*(b*f + 2*a*h) + b^4
*m - b^2*c*(b*k + 4*a*m) + c^2*(b^2*h + 3*a*b*k + 2*a^2*m))/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt
[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(7/2)*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + ((c^3*f - c^2*(b*h + a*k) - b^3*m +
b*c*(b*k + 2*a*m) - (2*c^4*d - c^3*(b*f + 2*a*h) + b^4*m - b^2*c*(b*k + 4*a*m) + c^2*(b^2*h + 3*a*b*k + 2*a^2*
m))/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(7/2)*Sqrt[b + Sqrt
[b^2 - 4*a*c]]) - ((2*c^3*e - c^2*(b*g + 2*a*j) - b^3*l + b*c*(b*j + 3*a*l))*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 -
4*a*c]])/(2*c^3*Sqrt[b^2 - 4*a*c]) + ((c^2*g + b^2*l - c*(b*j + a*l))*Log[a + b*x^2 + c*x^4])/(4*c^3)

Rule 1673

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], k}, Int[Sum[Coeff[
Pq, x, 2*k]*x^(2*k), {k, 0, q/2}]*(a + b*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0,
(q - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rule 1676

Int[(Pq_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> Int[ExpandIntegrand[Pq/(a + b*x^2 + c*x^4), x], x
] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x^2] && Expon[Pq, x^2] > 1

Rule 1166

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^
2 - 4*a*c]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 1663

Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)
*SubstFor[x^2, Pq, x]*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x^2] && Inte
gerQ[(m - 1)/2]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx &=\int \frac{x \left (e+g x^2+j x^4+l x^6\right )}{a+b x^2+c x^4} \, dx+\int \frac{d+f x^2+h x^4+k x^6+m x^8}{a+b x^2+c x^4} \, dx\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{e+g x+j x^2+l x^3}{a+b x+c x^2} \, dx,x,x^2\right )+\int \left (\frac{c^2 h+b^2 m-c (b k+a m)}{c^3}+\frac{(c k-b m) x^2}{c^2}+\frac{m x^4}{c}+\frac{c^3 d-a c^2 h-a b^2 m+a c (b k+a m)+\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)\right ) x^2}{c^3 \left (a+b x^2+c x^4\right )}\right ) \, dx\\ &=\frac{\left (c^2 h+b^2 m-c (b k+a m)\right ) x}{c^3}+\frac{(c k-b m) x^3}{3 c^2}+\frac{m x^5}{5 c}+\frac{1}{2} \operatorname{Subst}\left (\int \left (\frac{c j-b l}{c^2}+\frac{l x}{c}+\frac{c^2 e-a c j+a b l+\left (c^2 g+b^2 l-c (b j+a l)\right ) x}{c^2 \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )+\frac{\int \frac{c^3 d-a c^2 h-a b^2 m+a c (b k+a m)+\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)\right ) x^2}{a+b x^2+c x^4} \, dx}{c^3}\\ &=\frac{\left (c^2 h+b^2 m-c (b k+a m)\right ) x}{c^3}+\frac{(c j-b l) x^2}{2 c^2}+\frac{(c k-b m) x^3}{3 c^2}+\frac{l x^4}{4 c}+\frac{m x^5}{5 c}+\frac{\operatorname{Subst}\left (\int \frac{c^2 e-a c j+a b l+\left (c^2 g+b^2 l-c (b j+a l)\right ) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 c^2}+\frac{\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)-\frac{2 c^4 d-c^3 (b f+2 a h)+b^4 m-b^2 c (b k+4 a m)+c^2 \left (b^2 h+3 a b k+2 a^2 m\right )}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx}{2 c^3}+\frac{\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)+\frac{2 c^4 d-c^3 (b f+2 a h)+b^4 m-b^2 c (b k+4 a m)+c^2 \left (b^2 h+3 a b k+2 a^2 m\right )}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx}{2 c^3}\\ &=\frac{\left (c^2 h+b^2 m-c (b k+a m)\right ) x}{c^3}+\frac{(c j-b l) x^2}{2 c^2}+\frac{(c k-b m) x^3}{3 c^2}+\frac{l x^4}{4 c}+\frac{m x^5}{5 c}+\frac{\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)+\frac{2 c^4 d-c^3 (b f+2 a h)+b^4 m-b^2 c (b k+4 a m)+c^2 \left (b^2 h+3 a b k+2 a^2 m\right )}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{7/2} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)-\frac{2 c^4 d-c^3 (b f+2 a h)+b^4 m-b^2 c (b k+4 a m)+c^2 \left (b^2 h+3 a b k+2 a^2 m\right )}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{7/2} \sqrt{b+\sqrt{b^2-4 a c}}}+\frac{\left (c^2 g+b^2 l-c (b j+a l)\right ) \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^3}+\frac{\left (2 c^3 e-c^2 (b g+2 a j)-b^3 l+b c (b j+3 a l)\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^3}\\ &=\frac{\left (c^2 h+b^2 m-c (b k+a m)\right ) x}{c^3}+\frac{(c j-b l) x^2}{2 c^2}+\frac{(c k-b m) x^3}{3 c^2}+\frac{l x^4}{4 c}+\frac{m x^5}{5 c}+\frac{\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)+\frac{2 c^4 d-c^3 (b f+2 a h)+b^4 m-b^2 c (b k+4 a m)+c^2 \left (b^2 h+3 a b k+2 a^2 m\right )}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{7/2} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)-\frac{2 c^4 d-c^3 (b f+2 a h)+b^4 m-b^2 c (b k+4 a m)+c^2 \left (b^2 h+3 a b k+2 a^2 m\right )}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{7/2} \sqrt{b+\sqrt{b^2-4 a c}}}+\frac{\left (c^2 g+b^2 l-c (b j+a l)\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3}-\frac{\left (2 c^3 e-c^2 (b g+2 a j)-b^3 l+b c (b j+3 a l)\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 c^3}\\ &=\frac{\left (c^2 h+b^2 m-c (b k+a m)\right ) x}{c^3}+\frac{(c j-b l) x^2}{2 c^2}+\frac{(c k-b m) x^3}{3 c^2}+\frac{l x^4}{4 c}+\frac{m x^5}{5 c}+\frac{\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)+\frac{2 c^4 d-c^3 (b f+2 a h)+b^4 m-b^2 c (b k+4 a m)+c^2 \left (b^2 h+3 a b k+2 a^2 m\right )}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{7/2} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)-\frac{2 c^4 d-c^3 (b f+2 a h)+b^4 m-b^2 c (b k+4 a m)+c^2 \left (b^2 h+3 a b k+2 a^2 m\right )}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{7/2} \sqrt{b+\sqrt{b^2-4 a c}}}-\frac{\left (2 c^3 e-c^2 (b g+2 a j)-b^3 l+b c (b j+3 a l)\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^3 \sqrt{b^2-4 a c}}+\frac{\left (c^2 g+b^2 l-c (b j+a l)\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3}\\ \end{align*}

Mathematica [A]  time = 1.61428, size = 816, normalized size = 1.5 \[ \frac{m x^5}{5 c}+\frac{l x^4}{4 c}+\frac{(c k-b m) x^3}{3 c^2}+\frac{(c j-b l) x^2}{2 c^2}+\frac{\left (m b^2+c^2 h-c (b k+a m)\right ) x}{c^3}+\frac{\left (2 d c^4+\left (-b f+\sqrt{b^2-4 a c} f-2 a h\right ) c^3+\left (2 m a^2+3 b k a-\sqrt{b^2-4 a c} k a+b^2 h-b \sqrt{b^2-4 a c} h\right ) c^2+b \left (-k b^2+\sqrt{b^2-4 a c} k b-4 a m b+2 a \sqrt{b^2-4 a c} m\right ) c+b^3 \left (b-\sqrt{b^2-4 a c}\right ) m\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{7/2} \sqrt{b^2-4 a c} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\left (2 d c^4-\left (b f+\sqrt{b^2-4 a c} f+2 a h\right ) c^3+\left (2 m a^2+3 b k a+\sqrt{b^2-4 a c} k a+b^2 h+b \sqrt{b^2-4 a c} h\right ) c^2-b \left (k b^2+\sqrt{b^2-4 a c} k b+4 a m b+2 a \sqrt{b^2-4 a c} m\right ) c+b^3 \left (b+\sqrt{b^2-4 a c}\right ) m\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{7/2} \sqrt{b^2-4 a c} \sqrt{b+\sqrt{b^2-4 a c}}}+\frac{\left (2 e c^3+\left (-b g+\sqrt{b^2-4 a c} g-2 a j\right ) c^2+\left (j b^2-\sqrt{b^2-4 a c} j b+3 a l b-a \sqrt{b^2-4 a c} l\right ) c+b^2 \left (\sqrt{b^2-4 a c}-b\right ) l\right ) \log \left (-2 c x^2-b+\sqrt{b^2-4 a c}\right )}{4 c^3 \sqrt{b^2-4 a c}}+\frac{\left (-2 e c^3+\left (b g+\sqrt{b^2-4 a c} g+2 a j\right ) c^2-\left (j b^2+\sqrt{b^2-4 a c} j b+3 a l b+a \sqrt{b^2-4 a c} l\right ) c+b^2 \left (b+\sqrt{b^2-4 a c}\right ) l\right ) \log \left (2 c x^2+b+\sqrt{b^2-4 a c}\right )}{4 c^3 \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x + f*x^2 + g*x^3 + h*x^4 + j*x^5 + k*x^6 + l*x^7 + m*x^8)/(a + b*x^2 + c*x^4),x]

[Out]

((c^2*h + b^2*m - c*(b*k + a*m))*x)/c^3 + ((c*j - b*l)*x^2)/(2*c^2) + ((c*k - b*m)*x^3)/(3*c^2) + (l*x^4)/(4*c
) + (m*x^5)/(5*c) + ((2*c^4*d + c^3*(-(b*f) + Sqrt[b^2 - 4*a*c]*f - 2*a*h) + b^3*(b - Sqrt[b^2 - 4*a*c])*m + c
^2*(b^2*h - b*Sqrt[b^2 - 4*a*c]*h + 3*a*b*k - a*Sqrt[b^2 - 4*a*c]*k + 2*a^2*m) + b*c*(-(b^2*k) + b*Sqrt[b^2 -
4*a*c]*k - 4*a*b*m + 2*a*Sqrt[b^2 - 4*a*c]*m))*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[
2]*c^(7/2)*Sqrt[b^2 - 4*a*c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - ((2*c^4*d - c^3*(b*f + Sqrt[b^2 - 4*a*c]*f + 2*a*h
) + b^3*(b + Sqrt[b^2 - 4*a*c])*m + c^2*(b^2*h + b*Sqrt[b^2 - 4*a*c]*h + 3*a*b*k + a*Sqrt[b^2 - 4*a*c]*k + 2*a
^2*m) - b*c*(b^2*k + b*Sqrt[b^2 - 4*a*c]*k + 4*a*b*m + 2*a*Sqrt[b^2 - 4*a*c]*m))*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sq
rt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(7/2)*Sqrt[b^2 - 4*a*c]*Sqrt[b + Sqrt[b^2 - 4*a*c]]) + ((2*c^3*e + c^2*
(-(b*g) + Sqrt[b^2 - 4*a*c]*g - 2*a*j) + b^2*(-b + Sqrt[b^2 - 4*a*c])*l + c*(b^2*j - b*Sqrt[b^2 - 4*a*c]*j + 3
*a*b*l - a*Sqrt[b^2 - 4*a*c]*l))*Log[-b + Sqrt[b^2 - 4*a*c] - 2*c*x^2])/(4*c^3*Sqrt[b^2 - 4*a*c]) + ((-2*c^3*e
 + c^2*(b*g + Sqrt[b^2 - 4*a*c]*g + 2*a*j) + b^2*(b + Sqrt[b^2 - 4*a*c])*l - c*(b^2*j + b*Sqrt[b^2 - 4*a*c]*j
+ 3*a*b*l + a*Sqrt[b^2 - 4*a*c]*l))*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x^2])/(4*c^3*Sqrt[b^2 - 4*a*c])

________________________________________________________________________________________

Maple [B]  time = 0.046, size = 3835, normalized size = 7. \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((m*x^8+l*x^7+k*x^6+j*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a),x)

[Out]

1/4*l*x^4/c+1/5*m*x^5/c+1/2/(4*a*c-b^2)*2^(1/2)/(((-4*a*c+b^2)^(1/2)-b)*c)^(1/2)*arctanh(c*x*2^(1/2)/(((-4*a*c
+b^2)^(1/2)-b)*c)^(1/2))*f*b^2-1/2/(4*a*c-b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2)/((b
+(-4*a*c+b^2)^(1/2))*c)^(1/2))*f*b^2+1/c*(-4*a*c+b^2)^(1/2)/(4*a*c-b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/
2)*arctan(c*x*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*a^2*m-1/2/c^2*(-4*a*c+b^2)^(1/2)/(4*a*c-b^2)*2^(1/2)/(
(b+(-4*a*c+b^2)^(1/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*a*c+b^2)^(1/2)-b)*c)^(1/2)*arctanh(c*x*2^(1/2)/(((-4*a*c+b^2)^(1/2)-b)*c)^
(1/2))*b^5*m-(-4*a*c+b^2)^(1/2)/(4*a*c-b^2)*2^(1/2)/(((-4*a*c+b^2)^(1/2)-b)*c)^(1/2)*arctanh(c*x*2^(1/2)/(((-4
*a*c+b^2)^(1/2)-b)*c)^(1/2))*a*h-(-4*a*c+b^2)^(1/2)/(4*a*c-b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arcta
n(c*x*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*a*h-1/3/c^2*x^3*b*m-1/2/c^2*x^2*b*l-1/c^2*a*m*x+1/c^3*b^2*m*x-
1/c^2*b*k*x+1/4/c^2/(4*a*c-b^2)*ln(-2*c*x^2+(-4*a*c+b^2)^(1/2)-b)*b^3*j+1/4/c^2/(4*a*c-b^2)*ln(2*c*x^2+(-4*a*c
+b^2)^(1/2)+b)*b^3*j-1/4/c^3/(4*a*c-b^2)*ln(2*c*x^2+(-4*a*c+b^2)^(1/2)+b)*b^4*l-1/4/c^3/(4*a*c-b^2)*ln(-2*c*x^
2+(-4*a*c+b^2)^(1/2)-b)*b^4*l-1/c/(4*a*c-b^2)*ln(-2*c*x^2+(-4*a*c+b^2)^(1/2)-b)*a^2*l-1/c/(4*a*c-b^2)*ln(2*c*x
^2+(-4*a*c+b^2)^(1/2)+b)*a^2*l-1/4/(4*a*c-b^2)/c*ln(2*c*x^2+(-4*a*c+b^2)^(1/2)+b)*g*b^2-1/4/(4*a*c-b^2)/c*ln(-
2*c*x^2+(-4*a*c+b^2)^(1/2)-b)*g*b^2

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{12 \, c^{2} m x^{5} + 15 \, c^{2} l x^{4} + 20 \,{\left (c^{2} k - b c m\right )} x^{3} + 30 \,{\left (c^{2} j - b c l\right )} x^{2} + 60 \,{\left (c^{2} h - b c k +{\left (b^{2} - a c\right )} m\right )} x}{60 \, c^{3}} - \frac{-\int \frac{c^{3} d - a c^{2} h + a b c k +{\left (c^{3} g - b c^{2} j +{\left (b^{2} c - a c^{2}\right )} l\right )} x^{3} +{\left (c^{3} f - b c^{2} h +{\left (b^{2} c - a c^{2}\right )} k -{\left (b^{3} - 2 \, a b c\right )} m\right )} x^{2} -{\left (a b^{2} - a^{2} c\right )} m +{\left (c^{3} e - a c^{2} j + a b c l\right )} x}{c x^{4} + b x^{2} + a}\,{d x}}{c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((m*x^8+l*x^7+k*x^6+j*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a),x, algorithm="maxima")

[Out]

1/60*(12*c^2*m*x^5 + 15*c^2*l*x^4 + 20*(c^2*k - b*c*m)*x^3 + 30*(c^2*j - b*c*l)*x^2 + 60*(c^2*h - b*c*k + (b^2
 - a*c)*m)*x)/c^3 - integrate(-(c^3*d - a*c^2*h + a*b*c*k + (c^3*g - b*c^2*j + (b^2*c - a*c^2)*l)*x^3 + (c^3*f
 - b*c^2*h + (b^2*c - a*c^2)*k - (b^3 - 2*a*b*c)*m)*x^2 - (a*b^2 - a^2*c)*m + (c^3*e - a*c^2*j + a*b*c*l)*x)/(
c*x^4 + b*x^2 + a), x)/c^3

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((m*x^8+l*x^7+k*x^6+j*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((m*x**8+l*x**7+k*x**6+j*x**5+h*x**4+g*x**3+f*x**2+e*x+d)/(c*x**4+b*x**2+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((m*x^8+l*x^7+k*x^6+j*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError